<h3>Example discussion</h3>

<div class="sub-box">

<p>
This example demonstrates how easily and quickly can the wizard provide us with three alternative solutions, for implementing the otherwise cumbersome and error-prone ordering of custom structures and classes in generic C++ programming. The objective of the example is to produce C++ code, which can afterwards handle the ordering of a very typical two-dimensional <em>point</em> structure, first by the x-coordinate and then by the y-coordinate. The exact data type used in this example is the very simple <em>point</em> structure 	shown bellow.
</p>

<table width="100%"><tbody><tr><td align="center">
<table style="border: 1px black dashed"><tbody><tr><td>
<pre>
<code class="keyword">struct</code> <strong>point</strong> <code class="comment">//Example structure</code>
{
    <code class="keyword">int</code> <strong>x</strong>, <strong>y</strong>;
};
</pre>
</td></tr></tbody></table>
</td></tr></tbody></table>

<p>
It is interesting to notice how effortlessly our <em>non-less-than-comparable</em> point structure can become fully compatible with <em>STL</em> algorithms like <em>std::sort</em> and <em>STL</em> containers like <em>std::set</em>, not to mention a plethora of other generic components. It is just a matter of correctly placing four C++ identifier names in the three fields of the wizard form. However, the real fun begins when you use the wizard form yourself, to modify the original example scenario. For instance, you can easily reverse the significance of the coordinates in the point-structure ordering, by just modifying the field names from <em>"x y"</em> to <em>"y x"</em>. Furthermore, you can change the sorting order from <em>ascending</em> to <em>descending</em> with a single click on the corresponding radio-button. So play with this tool and have fun...
</p>

</div>
